package cn.jbit.smbms.service.impl;

import cn.jbit.smbms.dao.BillDao;
import cn.jbit.smbms.pojo.Bill;
import cn.jbit.smbms.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class BillServiceImpl implements BillService {
    @Autowired
    private BillDao billDao;

    @Override
    public List<Bill> queryAll() {
        return billDao.queryAll();
    }

    @Override
    public int queryPageCount(Map<String, Object> param) {
        return billDao.queryPageCount(param);
    }

    @Override
    public List queryPageList(Map<String, Object> param) {
        return billDao.queryPageList(param);
    }

    @Override
    public int doAdd(Bill bill) {
        return billDao.insert(bill);
    }

    @Override
    public int deleteById(Integer id) {
        return billDao.deleteById(id);
    }

    @Override
    public Bill queryBillById(Integer id) {
        return billDao.queryBillById(id);
    }

    @Override
    public int updateByBill(Bill bill) {
        return billDao.updateByBill(bill);
    }

    @Override
    public int insertBillByBatch(List<Bill> list) {
        return billDao.insertBillByBatch(list);
    }
}
